/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package upc.jfactory.scp.jpa.bean;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Diego
 */
@Entity
@Table(name = "Entrevista", catalog = "DAEPIFS_DB", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "Entrevista.findAll", query = "SELECT e FROM Entrevista e"),
    @NamedQuery(name = "Entrevista.findByEntrevistaId", query = "SELECT e FROM Entrevista e WHERE e.entrevistaId = :entrevistaId"),
    @NamedQuery(name = "Entrevista.findByOfertaempresaId", query = "SELECT e FROM Entrevista e WHERE e.ofertaempresaId = :ofertaempresaId"),
    @NamedQuery(name = "Entrevista.findByPostulanteId", query = "SELECT e FROM Entrevista e WHERE e.postulanteId = :postulanteId"),
    @NamedQuery(name = "Entrevista.findByFechaHora", query = "SELECT e FROM Entrevista e WHERE e.fechaHora = :fechaHora")})
public class Entrevista implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "entrevista_id", nullable = false)
    private Integer entrevistaId;
    @Basic(optional = false)
    @Column(name = "ofertaempresa_id", nullable = false)
    private int ofertaempresaId;
    @Column(name = "postulante_id")
    private Integer postulanteId;
    @Column(name = "fecha_hora")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaHora;

    public Entrevista() {
    }

    public Entrevista(Integer entrevistaId) {
        this.entrevistaId = entrevistaId;
    }

    public Entrevista(Integer entrevistaId, int ofertaempresaId) {
        this.entrevistaId = entrevistaId;
        this.ofertaempresaId = ofertaempresaId;
    }

    public Integer getEntrevistaId() {
        return entrevistaId;
    }

    public void setEntrevistaId(Integer entrevistaId) {
        this.entrevistaId = entrevistaId;
    }

    public int getOfertaempresaId() {
        return ofertaempresaId;
    }

    public void setOfertaempresaId(int ofertaempresaId) {
        this.ofertaempresaId = ofertaempresaId;
    }

    public Integer getPostulanteId() {
        return postulanteId;
    }

    public void setPostulanteId(Integer postulanteId) {
        this.postulanteId = postulanteId;
    }

    public Date getFechaHora() {
        return fechaHora;
    }

    public void setFechaHora(Date fechaHora) {
        this.fechaHora = fechaHora;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (entrevistaId != null ? entrevistaId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Entrevista)) {
            return false;
        }
        Entrevista other = (Entrevista) object;
        if ((this.entrevistaId == null && other.entrevistaId != null) || (this.entrevistaId != null && !this.entrevistaId.equals(other.entrevistaId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "upc.jfactory.scp.jpa.bean.Entrevista[entrevistaId=" + entrevistaId + "]";
    }

}
